from django import forms

from .models import UserProfile


"""
The example: The usage of django.forms.Form example
class ExampleForm(forms.Form):
	name = forms.CharField(max_length=100)
	age = forms.IntegerField()
"""


class RegisterForm(forms.ModelForm):
	"""  用户注册表单 """
	class Meta:
		model = UserProfile
		fields = '__all__'
		exclude = ['create_time', 'update_time']


class LoginForm(forms.Form):
	""" 用户登陆表单 """
	username = forms.CharField(required=True)
	password = forms.CharField(required=True, min_length=5)
